#define _CRT_SECURE_NO_WARNINGS 1

#define MAX_NAME 20
#define MAX_SEX 5
#define MAX_ADDR 20
#define MAX_TEL 12
#define ADD_CAPACITY 2

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

typedef struct PeoInfo
{
	char name[MAX_NAME];
	int age;
	char sex[MAX_SEX];
	char addr[MAX_ADDR];
	char tel[MAX_TEL];
}PeoInfo;

typedef struct Contact
{
	PeoInfo* data;
	int size;
	int capacity;
}Contact;

void AddContact(Contact* ps);

void InitContact(Contact* ps);

void ShowContact(Contact* ps);

void DelContact(Contact* ps);

int SearchContact(Contact* ps);

void ModifyContact(Contact* ps);

void sortContact(Contact* ps);

void clearContact(Contact* ps);

void saveContact(Contact* ps);